package com.mooco.dongba.sys.service.impl;

import com.mooco.dongba.common.anotation.RequiredCache;
import com.mooco.dongba.common.pojo.Node;
import com.mooco.dongba.sys.dao.SysDeptDao;
import com.mooco.dongba.sys.pojo.SysDept;
import com.mooco.dongba.sys.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysDeptServiceImpl implements SysDeptService {
    @Autowired
    private SysDeptDao sysDeptDao;

    @Override
    @RequiredCache
    public List<SysDept> findObjects() {
        return sysDeptDao.findObjects();
    }

    @Override
    public List<Node> findZTreeNodes() {
        return sysDeptDao.findZTreeNodes();
    }
}
